{if $editor == 'ueditorplus'}
<script src="/static/ueditorplus/ueditor.config.js"></script>
<script src="/static/ueditorplus/ueditor.all.js"></script>
<script>
window.editor = UE.getEditor('editor', {
    serverUrl: "{:url('admin/editor/ueditorplus')}",
    imageConfig: { disableOnline: true },
    initialFrameHeight: layui.jquery(window).height() - 343,
    catchRemoteImageEnable: false,
});
window.setEditor = function(content) { window.editor.setContent(content) }
123123123</script>
{elseif $editor == 'jodit' /}
<link type="text/css" rel="stylesheet" href="/static/jodit/jodit.min.css" />
<script type="text/javascript" src="/static/jodit/jodit.min.js"></script>
<script>
window.editor = Jodit.make('#editor', {
    toolbarInlineForSelection: true,
    width: '100%',
    height: '800px',
    language: 'zh_cn',
    uploader: {
        url: "{:url('admin/editor/jodit')}?action=fileUpload",
        // isSuccess: function(res) {
        //     for (var i = 0; i < res.data.files.length; i++) {
        //         if (res.data.files[i] === '') {
        //             this.jodit.message.error(res.data.messages[i]);
        //         }
        //     }
            // this.jodit.s.insertHTML('<p><video src="http://wglj.jiaozuo.gov.cn/upfile/202209/2022091075089609.mp4" controls="controls">您的浏览器不支持 video 标签。</video></p>');
            // return true;
        // },
        // buildData: function (data) {
            // console.log(data.getAll('files[0]')[0].size > 1024 * 1024 * {:ini_get('upload_max_filesize')});
            // return new Promise(function() {});
        // },
        // getMessage: function (res) {
        // }
        // process: function (resp) {
        //     console.log(resp);
        //     return {
        //         files: resp.files || [],
        //         path: resp.path,
        //         baseurl: resp.baseurl,
        //         error: resp.error,
        //         msg: resp.msg
        //     };
        // },
    },
    beautifyHTML: false,
    sourceEditor: false,
});
window.setEditor = function(content) { window.editor.setEditorValue(content); console.log(window.editor); }
</script>
{elseif $editor == 'niceditor' /}

{/if}